<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			//179000516王德令
			// 等腰三角形
			document.write(" <center> ");
			var num = Number(prompt("请输入三角形行数："));
			document.write("");
			for(var i=1;i<=num;i++){
				for(var j=1;j<2*num-i;j++){
					document.write("&nbsp");
				}
				for(var k=1;k<=2*i-1;k++){
					document.write(" * ");
				}
				document.write("<br/>");
			}
			//平行四边形
			document.write(" <center> ");
			var num2 =Number(prompt("请输入平行四边形的行数："));
			for(var a=1;a<=num2;a++){
				document.write("<br/>");
				for(var b=0;b<=num2-a;b++){
					document.write("&nbsp&nbsp");
				}
				for(var c=1;c<=num2;c++){
					document.write("&nbsp*");

				}
			}
			
			//菱形
			document.write(" <center> ");
			var row=Number(prompt("请输入菱形上三角的行数"));
			for(var i=1;i<=2*row-1;i++){
			    var stars=2*row-1-2*Math.abs(i-row);//星
			    for(var j=1;j<=stars;j++){
			        document.write(" * ");
			    }
			    document.write("<br>");
			}
			
				
		</script>
	</head>
	<body>
	</body>
</html>
